package com.example.yimai.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Data
@TableName("easybuy_user")
@Document(indexName = "user")
public class User {

    @TableId(type = IdType.AUTO)
    @Id
    private String id;
    @Field(type = FieldType.Text)
    private String loginName;
    @Field(type = FieldType.Text)
    private String userName;
    @Field(type = FieldType.Text)
    private String password;
    @Field(type = FieldType.Integer)
    private Integer sex;
    @Field(type = FieldType.Text)
    private String identityCode;
    @Field(type = FieldType.Text)
    private String email;
    @Field(type = FieldType.Text)
    private String mobile;
    @Field(type = FieldType.Integer)
    private Integer type;
    @TableLogic(value = "0", delval = "1")
    private int deleted = 0;

}
